package com.nsn.das.midas.model.mml.letter;

import java.util.List;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import com.nsn.das.midas.model.mml.data.MMLGroupData;
import com.nsn.das.midas.model.mml.data.MMLProgramData;

@Entity
@DiscriminatorValue("group_letter")
public class MMLGroupLetter extends MMLLetter{
	@OneToMany(fetch=FetchType.LAZY,mappedBy="groupLetter")
	private List<MMLGroupData> groupDatas;
	@OneToMany(fetch=FetchType.LAZY,mappedBy="groupLetter")
	private List<MMLProgramData> programDatas;
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name="class_letter_id")
	private MMLClassLetter classLetter;
	
	public List<MMLGroupData> getGroupDatas() {
		return groupDatas;
	}
	public void setGroupDatas(List<MMLGroupData> groupDatas) {
		this.groupDatas = groupDatas;
	}
	
	public List<MMLProgramData> getProgramDatas() {
		return programDatas;
	}
	public void setProgramDatas(List<MMLProgramData> programDatas) {
		this.programDatas = programDatas;
	}
	
	public MMLClassLetter getClassLetter() {
		return classLetter;
	}
	
	public void setClassLetter(MMLClassLetter classLetter) {
		this.classLetter = classLetter;
	}
}
